package rmhc.server Folder
{
	import com.adobe.serialization.json.JSON;
	
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.utils.ByteArray;

	public class FileUploadRequest extends ServerRequest
	{
		public function FileUploadRequest( url:String , callback:Function , data:Object , binary:ByteArray , filename:String , mimetype:String  = "application/octet-stream" )
		{
			super( callback );
			
			data.file = "file1";
			
			var upl:FileUploader = new FileUploader( url );
			upl.addVar( "request" , JSON.encode( data ) );
			upl.addFile( "file1" , filename , binary , mimetype );
			lod = upl;
			load( null );
		}
	}
}